<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Click events should propagate in disconnected DOM trees.");

var clickedOnParent = false;
var clickedOnChild = false;

var parent = document.createElement('div');
var child = document.createElement('div');
parent.appendChild(child);
parent.addEventListener('click', function(e) { clickedOnParent = true; } );
child.addEventListener('click', function(e) { clickedOnChild = true; } );
child.click();

shouldBeTrue("clickedOnParent");
shouldBeTrue("clickedOnChild");
</script>
</body>
</html>
